import request from "@/router/axios.js";

export const authMenu = () => {
  return request({
    url: "/admin/auth/authMenu",
    method: "get",
  });
};
export const treeList = () => {
  return request({
    url: "/admin/sysMenu/menuTree",
    method: "get",
  });
};
// 删除菜单
export function remove(ids) {
  return request({
    url: "/admin/sysMenu/remove",
    method: "get",
    params: {
      ids,
    },
  });
}

// 修改菜单
export function update(data) {
  return request({
    url: "/admin/sysMenu/update",
    method: "post",
    data: data,
  });
}

// 新增菜单
export function save(data) {
  return request({
    url: "/admin/sysMenu/save",
    method: "post",
    data: data,
  });
}

// 创建按钮
export function createButton(ids) {
  return request({
    url: "/admin/sysMenu/createButton",
    method: "get",
    params: {
      ids,
    },
  });
}
